<?php
namespace Home\Controller;

class IndexController extends CommonController {

	public function index(){
		$Food=D('Foodcat');		
		$foodcatlist=$Food->select();
		$this->assign('foodcatlist',$foodcatlist);//输出订单号

		$Food=M('Food');
		$foodlist=$Food->limit(12)->order('fid desc')->select();
		$this->assign('foodlist',$foodlist);

		$Link=M('Link');
		$llist=$Link->where('type=0')->limit(30)->order('lid desc')->select();
		$this->assign('llist',$llist);

		$this->display();
	}

	public function flist(){
		$data['fcid']=I('id');//店铺分类
		$Food=D('Foodcat');		
		$foodcatlist=$Food->select();		
		$this->assign('foodcatlist',$foodcatlist);//输出订单号

		$Food=M('Food');
		$foodlist=$Food->where($data)->select();
		$this->assign('foodlist',$foodlist);
		// dump($foodlist);
		$this->display();
	}
}